#ifndef _FINGERPRINT_MANAGER_HEAD_H
#define _FINGERPRINT_MANAGER_HEAD_H
#include "FingerPrint-device.h"
#include <condition_variable>
#include <thread>

class FingerPrintManager
{
public:
    FingerPrintManager(FingerPrintDevice* fingerPrintDevice);
    void verifyFingerprintTaskRun(void);
    // 暂停识别
    void pauseVerifyFingerprintTaks(void);
    // 恢复识别
    void resumeVerifyFingerprintTaks(void);
    // 录入指纹
    bool recordFingerprint(const uint16_t pos);
    // 删除指定的指纹
    bool deleteFingerprint(const uint16_t pos);
    // 清除指纹库
    bool clearFingerprintLib(void);

private:
    FingerPrintDevice* fingerPrintDevice;
    // 循环比对的线程
    thread* verifyLoopThread;
    // 比对暂停标志
    bool verifyThreadPauseFlag;

    // 条件变量
    std::condition_variable verifyCond;
    // 互斥锁
    std::mutex verifyMutex;
};



#endif